package masterjava.common.client.gxt.charts;

/**
 * User: gkislin
 * Date: 7/7/11
 */

import com.extjs.gxt.charts.client.Chart;
import com.google.gwt.user.client.Element;

public class GxtChart extends Chart {

    private final IChartModel model;

    public GxtChart(IChartModel model) {
        super("gxt/chart/open-flash-chart.swf");
        setBorders(true);
        this.model = model;
    }

    @Override
    protected void onRender(Element parent, int index) {
        super.onRender(parent, index);
        model.setChartModel(this);
    }
}
